//
//  RootViewController.m
//  ZFJiOSDemo
//
//  Created by ZFJMBPro on 2020/1/16.
//  Copyright © 2020 ZFJ. All rights reserved.
//

#import "RootViewController.h"
#import "ZFJWebViewController.h"

@interface RootViewController ()

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    if (@available(iOS 13.0, *)) {
        self.view.backgroundColor = [UIColor systemGroupedBackgroundColor];
    } else {
        self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
    }
    
    UIButton *button = [[UIButton alloc] init];
    button.frame = CGRectMake((ScreenWidth - 100)/2, (ScreenHeight - 100)/2, 100, 100);
    button.backgroundColor = [UIColor yellowColor];
    [button addTarget:self action:@selector(buttonClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

- (void)buttonClick{
    ZFJWebViewController *zvc = [[ZFJWebViewController alloc] init];
//    zvc.urlStr = @"http://www.win4000.com/mobile_0_0_119_1.html";
//    zvc.urlStr = @"https://www.meitulu.com";
    zvc.urlStr = @"http://www.laotuzi.com/meizitu/";
    [self.navigationController pushViewController:zvc animated:YES];
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
